import { Node } from "cc";
import { CreatorAction } from "./CreatorAction";
import { CreatorScheduler } from "./CreatorScheduler";

export const sceneScheduler = new CreatorScheduler(CreatorAction);

export const nodeScheduler = (node: Node, needValid?: boolean, needActive?: boolean, needCache?: boolean): CreatorScheduler => {
    let creatorScheduler = new CreatorScheduler(CreatorAction);
    creatorScheduler.node = node;
    creatorScheduler.needValid = true;
    creatorScheduler.needActive = true;
    creatorScheduler.needCache = false;
    return creatorScheduler;
}